package com.self.springframework.util;

public class ClassUtils {
    public static ClassLoader getDefaultClassLoader() {
        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
        return classLoader != null ? classLoader : ClassUtils.class.getClassLoader();
    }

    public static boolean isCglibProxyClass(Class<?> clazz){
        return (clazz!=null && isCglibProxyClassName(clazz.getName()));
    }

    public static boolean isCglibProxyClassName(String className){
        return (className!= null && className.contains("$$"));
    }
}
